﻿<Page
    x:Class="Wimm.UI.Pages.YearDiagram"
    xmlns:Charting="using:WinRTXamlToolkit.Controls.DataVisualization.Charting"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Wimm.UI"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <!-- Back button and page title -->
        <Grid Background="#00a2e8" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="BackButton" Margin="39,59,39,0" Click="BackButton_Click"
                        Style="{StaticResource NavigationBackButtonNormalStyle}"
                        VerticalAlignment="Top"
                        AutomationProperties.Name="Back"
                        AutomationProperties.AutomationId="BackButton"
                        AutomationProperties.ItemType="Navigation Button"/>
            <TextBlock x:Name="PageTitle" x:Uid="Section3HeaderReport" Text="My expences and incomes for the current year" Style="{StaticResource HeaderTextBlockStyle}" Grid.Column="1" 
                        IsHitTestVisible="false" TextWrapping="NoWrap" VerticalAlignment="Bottom" Margin="0,0,30,40"/>
        </Grid>
        <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
        <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <!--<ColumnDefinition Width="auto"/>-->
                </Grid.ColumnDefinitions>
                <Charting:Chart x:Name="BarChart" HorizontalAlignment="Left" VerticalAlignment="Top" Width="1300" Height="600">
                    <Charting:Chart.Series>
                        <Charting:BarSeries x:Uid="Section3HeaderReportExpense" Title="My Expenses" Margin="0" IndependentValuePath="YearMonth" DependentValuePath="Amount" IsSelectionEnabled="True"/>
                        <Charting:BarSeries x:Uid="Section3HeaderReportIncome" Title="My Incomes" Margin="0" IndependentValuePath="YearMonth" DependentValuePath="Amount" IsSelectionEnabled="True"/>
                    </Charting:Chart.Series>
                    <Charting:Chart.Palette>
                        <Charting:ResourceDictionaryCollection>
                            <!-- Blue -->
                            <ResourceDictionary>
                                <SolidColorBrush x:Key="Background" Color="#FF4586D8" />
                                <Style x:Key="DataPointStyle" TargetType="Control">
                                    <Setter Property="Background" Value="{StaticResource Background}" />
                                </Style>
                                <Style x:Key="DataShapeStyle" TargetType="Shape">
                                    <Setter Property="Stroke" Value="{StaticResource Background}" />
                                    <Setter Property="StrokeThickness" Value="2" />
                                    <Setter Property="StrokeMiterLimit" Value="1" />
                                    <Setter Property="Fill" Value="{StaticResource Background}" />
                                </Style>
                            </ResourceDictionary>
                            <!-- Red -->
                            <ResourceDictionary>
                                <SolidColorBrush x:Key="Background" Color="#FFDC443F" />
                                <Style x:Key="DataPointStyle" TargetType="Control">
                                    <Setter Property="Background" Value="{StaticResource Background}" />
                                </Style>
                                <Style x:Key="DataShapeStyle" TargetType="Shape">
                                    <Setter Property="Stroke" Value="{StaticResource Background}" />
                                    <Setter Property="StrokeThickness" Value="2" />
                                    <Setter Property="StrokeMiterLimit" Value="1" />
                                    <Setter Property="Fill" Value="{StaticResource Background}" />
                                </Style>
                            </ResourceDictionary>
                            <!-- Yellow -->
                            <ResourceDictionary>
                                <SolidColorBrush x:Key="Background" Color="#FFD6DC3B" />
                                <Style x:Key="DataPointStyle" TargetType="Control">
                                    <Setter Property="Background" Value="{StaticResource Background}" />
                                </Style>
                                <Style x:Key="DataShapeStyle" TargetType="Shape">
                                    <Setter Property="Stroke" Value="{StaticResource Background}" />
                                    <Setter Property="StrokeThickness" Value="2" />
                                    <Setter Property="StrokeMiterLimit" Value="1" />
                                    <Setter Property="Fill" Value="{StaticResource Background}" />
                                </Style>
                            </ResourceDictionary>
                            <!-- Green -->
                            <ResourceDictionary>
                                <SolidColorBrush x:Key="Background" Color="#FFAAD34F" />
                                <Style x:Key="DataPointStyle" TargetType="Control">
                                    <Setter Property="Background" Value="{StaticResource Background}" />
                                </Style>
                                <Style x:Key="DataShapeStyle" TargetType="Shape">
                                    <Setter Property="Stroke" Value="{StaticResource Background}" />
                                    <Setter Property="StrokeThickness" Value="2" />
                                    <Setter Property="StrokeMiterLimit" Value="1" />
                                    <Setter Property="Fill" Value="{StaticResource Background}" />
                                </Style>
                            </ResourceDictionary>
                        </Charting:ResourceDictionaryCollection>
                    </Charting:Chart.Palette>
                </Charting:Chart>
        </Grid>
    </ScrollViewer>
    </Grid>
</Page>
